<template>
	<el-drawer title="合同详情" v-model="visible" :size="800" destroy-on-close @closed="$emit('closed')">
		<el-container>
			<el-main>
				<el-form-item label="合同标题" prop="title">{{form.title}}
				</el-form-item>
				<el-row :gutter="24">
					<el-col :lg="12">
						<el-form-item label="合同编号" prop="codeNo">
							{{form.codeNo}}
						</el-form-item>
					</el-col>
					<el-col :lg="12">
						<el-form-item label="上会会议号" prop="meetingNo">
							{{form.meetingNo}}
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="24">
					<el-col :lg="12">
						<el-form-item label="合同甲方" prop="sourceOrgId">
							{{form.sourceOrgName}}
						</el-form-item>
					</el-col>
					<el-col :lg="12">
						<el-form-item label="合同乙方" prop="opposingOrgId">
							{{form.opposingOrgName}}
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="24">
					<el-col :lg="12">
						<el-form-item label="经理办公会情况" prop="meetRemark1">{{form.meetRemark1}}
						</el-form-item>
					</el-col>
					<el-col :lg="12">
						<el-form-item label="党委会情况" prop="meetRemark2">{{form.meetRemark2}}
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="24">
					<el-col :lg="12">
						<el-form-item label="合同类型" prop="htType">
							{{form.htTypeName}}
						</el-form-item>
					</el-col>
					<el-col :lg="12">
						<el-form-item label="收支类型" prop="recPayType">
							{{form.recPayTypeName}}
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="24">
					<el-col :lg="12">
						<el-form-item label="生效日期" prop="validFrom">{{form.validFrom}}
						</el-form-item>
					</el-col>
					<el-col :lg="12">
						<el-form-item label="终止日期" prop="validTo">{{form.validTo}}
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="24">
					<el-col :lg="12">
						<el-form-item label="签订日期" prop="signatureDate">{{form.signatureDate}}
						</el-form-item>
					</el-col>
				</el-row>
				<el-form-item label="合同摘要" prop="remark" style="margin-top:10px">{{form.remark}}
				</el-form-item>
				<div v-if="form.htState=='1'">
					<el-divider content-position="center">其它信息</el-divider>
					<el-form-item label="合同是否中止" prop="principalId">合同已中止
					</el-form-item>
					<el-form-item label="中止日期">{{form.stateDate}}
					</el-form-item>
					<el-form-item label="相关附件">
						<attach-menu :attachIds="form.stateAttachId" :roleFlag="3" :preview="true"></attach-menu>
					</el-form-item>
				</div>
				<div style="width: 100px;height: 50px;position: absolute;right: 20px;top:70px;line-height: 50px">
					<el-button type="danger" style="height: 50px;width: 100%;" v-if="this.form.archiveStatus=='2'">待归档</el-button>
					<el-button type="success" style="height: 50px;width: 100%;" v-if="this.form.archiveStatus=='3'">已归档</el-button>
				</div>
				<el-footer style="text-align: center;">
					<el-button @click="visible=false">关闭</el-button>
				</el-footer>
			</el-main>
		</el-container>
	</el-drawer>
</template>
<script>
import AttachMenu from "@/views/module/attachMenu.vue";
export default {
	name: 'Ht Record Details',
	components: { AttachMenu},
	data() {
		return {
			form: {
				title: '',
				codeNo: '',
				sortName: "",
				sourceOrgName:'',
				opposingOrgName: '',
				validFrom: '',
				validTo: '',
				principalName:'',
				signatureDate: '',
				remark: '',
				archiveStatus:'',
				recPayTypeName:'',
				htTypeName:'',
				meetingNo:'',
				htState:'',
				stateAttachId:'',
				stateDate:"",
				meetRemark1:'',
				meetRemark2:''
			},
			model:"read",
			visible: false,
			isSaveing: false,
		}
	},
	mounted() {
	},
	methods: {
		open(model){
			this.model=model;
			this.visible = true;
			return this;
		},
		setData(data){
			this.form.title=data.title
			this.form.codeNo =data.codeNo
			this.form.sortName=data.sortName
			this.form.sourceOrgName = data.sourceOrgName
			this.form.opposingOrgName = data.opposingOrgName
			this.form.validFrom=data.validFrom
			this.form.validTo=data.validTo
			this.form.principalName=data.principalName
			this.form.signatureDate=data.signatureDate
			this.form.remark=data.remark
			this.form.archiveStatus = data.archiveStatus
			this.form.htTypeName =data.htTypeName
			this.form.recPayTypeName = data.recPayTypeName
			this.form.meetingNo = data.meetingNo
			this.form.htState = data.htState
			this.form.stateAttachId = data.stateAttachId
			this.form.stateDate = data.stateDate
			this.form.meetRemark1 = data.meetRemark1
			this.form.meetRemark2 = data.meetRemark2
		},
	}
}
</script>

<style>
</style>
